var Zepto = function() {
    function a(a) { return null == a ? String(a) : ce[fe.call(a)] || "object" }

    function c(c) { return "function" == a(c) }

    function h(a) { return null != a && a == a.window }

    function v(a) { return null != a && a.nodeType == a.DOCUMENT_NODE }

    function g(c) { return "object" == a(c) }

    function y(a) { return g(a) && !h(a) && Object.getPrototypeOf(a) == Object.prototype }

    function b(a) { return "number" == typeof a.length }

    function w(a) { return I.call(a, function(a) { return null != a }) }

    function E(a) { return a.length > 0 ? $.fn.concat.apply([], a) : a }

    function j(a) { return a.replace(/::/g, "/").replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2").replace(/([a-z\d])([A-Z])/g, "$1_$2").replace(/_/g, "-").toLowerCase() }

    function S(a) { return a in X ? X[a] : X[a] = new RegExp("(^|\\s)" + a + "(\\s|$)") }

    function T(a, c) { return "number" != typeof c || U[j(a)] ? c : c + "px" }

    function C(a) { var c, h; return H[a] || (c = V.createElement(a), V.body.appendChild(c), h = getComputedStyle(c, "").getPropertyValue("display"), c.parentNode.removeChild(c), "none" == h && (h = "block"), H[a] = h), H[a] }

    function O(a) { return "children" in a ? B.call(a.children) : $.map(a.childNodes, function(a) { return 1 == a.nodeType ? a : void 0 }) }

    function P(a, c, h) { for (Z in c) h && (y(c[Z]) || ve(c[Z])) ? (y(c[Z]) && !y(a[Z]) && (a[Z] = {}), ve(c[Z]) && !ve(a[Z]) && (a[Z] = []), P(a[Z], c[Z], h)) : c[Z] !== F && (a[Z] = c[Z]) }

    function N(a, c) { return null == c ? $(a) : $(a).filter(c) }

    function k(a, h, v, g) { return c(h) ? h.call(a, v, g) : h }

    function A(a, c, h) { null == h ? a.removeAttribute(c) : a.setAttribute(c, h) }

    function _(a, c) {
        var h = a.className || "",
            v = h && h.baseVal !== F;
        return c === F ? v ? h.baseVal : h : void(v ? h.baseVal = c : a.className = c)
    }

    function L(a) { var c; try { return a ? "true" == a || ("false" == a ? !1 : "null" == a ? null : /^0/.test(a) || isNaN(c = Number(a)) ? /^[\[\{]/.test(a) ? $.parseJSON(a) : a : c) : a } catch (e) { return a } }

    function M(a, c) { c(a); for (var i = 0, h = a.childNodes.length; h > i; i++) M(a.childNodes[i], c) }
    var F, Z, $, D, R, W, z = [],
        B = z.slice,
        I = z.filter,
        V = window.document,
        H = {},
        X = {},
        U = { "column-count": 1, columns: 1, "font-weight": 1, "line-height": 1, opacity: 1, "z-index": 1, zoom: 1 },
        J = /^\s*<(\w+|!)[^>]*>/,
        Y = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
        K = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
        G = /^(?:body|html)$/i,
        Q = /([A-Z])/g,
        te = ["val", "css", "html", "text", "data", "width", "height", "offset"],
        ee = ["after", "prepend", "before", "append"],
        ie = V.createElement("table"),
        oe = V.createElement("tr"),
        ae = { tr: V.createElement("tbody"), tbody: ie, thead: ie, tfoot: ie, td: oe, th: oe, "*": V.createElement("div") },
        se = /complete|loaded|interactive/,
        ue = /^[\w-]*$/,
        ce = {},
        fe = ce.toString,
        he = {},
        pe = V.createElement("div"),
        me = { tabindex: "tabIndex", readonly: "readOnly", "for": "htmlFor", "class": "className", maxlength: "maxLength", cellspacing: "cellSpacing", cellpadding: "cellPadding", rowspan: "rowSpan", colspan: "colSpan", usemap: "useMap", frameborder: "frameBorder", contenteditable: "contentEditable" },
        ve = Array.isArray || function(a) { return a instanceof Array };
    return he.matches = function(a, c) {
        if (!c || !a || 1 !== a.nodeType) return !1;
        var h = a.webkitMatchesSelector || a.mozMatchesSelector || a.oMatchesSelector || a.matchesSelector;
        if (h) return h.call(a, c);
        var v, g = a.parentNode,
            y = !g;
        return y && (g = pe).appendChild(a), v = ~he.qsa(g, c).indexOf(a), y && pe.removeChild(a), v
    }, R = function(a) { return a.replace(/-+(.)?/g, function(a, c) { return c ? c.toUpperCase() : "" }) }, W = function(a) { return I.call(a, function(c, h) { return a.indexOf(c) == h }) }, he.fragment = function(a, c, h) { var v, g, b; return Y.test(a) && (v = $(V.createElement(RegExp.$1))), v || (a.replace && (a = a.replace(K, "<$1></$2>")), c === F && (c = J.test(a) && RegExp.$1), c in ae || (c = "*"), b = ae[c], b.innerHTML = "" + a, v = $.each(B.call(b.childNodes), function() { b.removeChild(this) })), y(h) && (g = $(v), $.each(h, function(a, c) { te.indexOf(a) > -1 ? g[a](c) : g.attr(a, c) })), v }, he.Z = function(a, c) { return a = a || [], a.__proto__ = $.fn, a.selector = c || "", a }, he.isZ = function(a) { return a instanceof he.Z }, he.init = function(a, h) {
        var v;
        if (!a) return he.Z();
        if ("string" == typeof a)
            if (a = a.trim(), "<" == a[0] && J.test(a)) v = he.fragment(a, RegExp.$1, h), a = null;
            else {
                if (h !== F) return $(h).find(a);
                v = he.qsa(V, a)
            }
        else {
            if (c(a)) return $(V).ready(a);
            if (he.isZ(a)) return a;
            if (ve(a)) v = w(a);
            else if (g(a)) v = [a], a = null;
            else if (J.test(a)) v = he.fragment(a.trim(), RegExp.$1, h), a = null;
            else {
                if (h !== F) return $(h).find(a);
                v = he.qsa(V, a)
            }
        }
        return he.Z(v, a)
    }, $ = function(a, c) { return he.init(a, c) }, $.extend = function(a) { var c, h = B.call(arguments, 1); return "boolean" == typeof a && (c = a, a = h.shift()), h.forEach(function(h) { P(a, h, c) }), a }, he.qsa = function(a, c) {
        var h, g = "#" == c[0],
            y = !g && "." == c[0],
            b = g || y ? c.slice(1) : c,
            w = ue.test(b);
        return v(a) && w && g ? (h = a.getElementById(b)) ? [h] : [] : 1 !== a.nodeType && 9 !== a.nodeType ? [] : B.call(w && !g ? y ? a.getElementsByClassName(b) : a.getElementsByTagName(c) : a.querySelectorAll(c))
    }, $.contains = V.documentElement.contains ? function(a, c) { return a !== c && a.contains(c) } : function(a, c) {
        for (; c && (c = c.parentNode);)
            if (c === a) return !0;
        return !1
    }, $.type = a, $.isFunction = c, $.isWindow = h, $.isArray = ve, $.isPlainObject = y, $.isEmptyObject = function(a) { var c; for (c in a) return !1; return !0 }, $.inArray = function(a, c, i) { return z.indexOf.call(c, a, i) }, $.camelCase = R, $.trim = function(a) { return null == a ? "" : String.prototype.trim.call(a) }, $.uuid = 0, $.support = {}, $.expr = {}, $.map = function(a, c) {
        var h, i, v, g = [];
        if (b(a))
            for (i = 0; i < a.length; i++) h = c(a[i], i), null != h && g.push(h);
        else
            for (v in a) h = c(a[v], v), null != h && g.push(h);
        return E(g)
    }, $.each = function(a, c) {
        var i, h;
        if (b(a)) {
            for (i = 0; i < a.length; i++)
                if (c.call(a[i], i, a[i]) === !1) return a
        } else
            for (h in a)
                if (c.call(a[h], h, a[h]) === !1) return a; return a
    }, $.grep = function(a, c) { return I.call(a, c) }, window.JSON && ($.parseJSON = JSON.parse), $.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, a) { ce["[object " + a + "]"] = a.toLowerCase() }), $.fn = {
        forEach: z.forEach,
        reduce: z.reduce,
        push: z.push,
        sort: z.sort,
        indexOf: z.indexOf,
        concat: z.concat,
        map: function(a) { return $($.map(this, function(c, i) { return a.call(c, i, c) })) },
        slice: function() { return $(B.apply(this, arguments)) },
        ready: function(a) { return se.test(V.readyState) && V.body ? a($) : V.addEventListener("DOMContentLoaded", function() { a($) }, !1), this },
        get: function(a) { return a === F ? B.call(this) : this[a >= 0 ? a : a + this.length] },
        toArray: function() { return this.get() },
        size: function() { return this.length },
        remove: function() { return this.each(function() { null != this.parentNode && this.parentNode.removeChild(this) }) },
        each: function(a) { return z.every.call(this, function(c, h) { return a.call(c, h, c) !== !1 }), this },
        filter: function(a) { return c(a) ? this.not(this.not(a)) : $(I.call(this, function(c) { return he.matches(c, a) })) },
        add: function(a, c) { return $(W(this.concat($(a, c)))) },
        is: function(a) { return this.length > 0 && he.matches(this[0], a) },
        not: function(a) {
            var h = [];
            if (c(a) && a.call !== F) this.each(function(c) { a.call(this, c) || h.push(this) });
            else {
                var v = "string" == typeof a ? this.filter(a) : b(a) && c(a.item) ? B.call(a) : $(a);
                this.forEach(function(a) { v.indexOf(a) < 0 && h.push(a) })
            }
            return $(h)
        },
        has: function(a) { return this.filter(function() { return g(a) ? $.contains(this, a) : $(this).find(a).size() }) },
        eq: function(a) { return -1 === a ? this.slice(a) : this.slice(a, +a + 1) },
        first: function() { var a = this[0]; return a && !g(a) ? a : $(a) },
        last: function() { var a = this[this.length - 1]; return a && !g(a) ? a : $(a) },
        find: function(a) { var c, h = this; return c = a ? "object" == typeof a ? $(a).filter(function() { var a = this; return z.some.call(h, function(c) { return $.contains(c, a) }) }) : 1 == this.length ? $(he.qsa(this[0], a)) : this.map(function() { return he.qsa(this, a) }) : [] },
        closest: function(a, c) {
            var h = this[0],
                g = !1;
            for ("object" == typeof a && (g = $(a)); h && !(g ? g.indexOf(h) >= 0 : he.matches(h, a));) h = h !== c && !v(h) && h.parentNode;
            return $(h)
        },
        parents: function(a) { for (var c = [], h = this; h.length > 0;) h = $.map(h, function(a) { return (a = a.parentNode) && !v(a) && c.indexOf(a) < 0 ? (c.push(a), a) : void 0 }); return N(c, a) },
        parent: function(a) { return N(W(this.pluck("parentNode")), a) },
        children: function(a) { return N(this.map(function() { return O(this) }), a) },
        contents: function() { return this.map(function() { return B.call(this.childNodes) }) },
        siblings: function(a) { return N(this.map(function(i, a) { return I.call(O(a.parentNode), function(c) { return c !== a }) }), a) },
        empty: function() { return this.each(function() { this.innerHTML = "" }) },
        pluck: function(a) { return $.map(this, function(c) { return c[a] }) },
        show: function() { return this.each(function() { "none" == this.style.display && (this.style.display = ""), "none" == getComputedStyle(this, "").getPropertyValue("display") && (this.style.display = C(this.nodeName)) }) },
        replaceWith: function(a) { return this.before(a).remove() },
        wrap: function(a) {
            var h = c(a);
            if (this[0] && !h) var v = $(a).get(0),
                g = v.parentNode || this.length > 1;
            return this.each(function(c) { $(this).wrapAll(h ? a.call(this, c) : g ? v.cloneNode(!0) : v) })
        },
        wrapAll: function(a) {
            if (this[0]) {
                $(this[0]).before(a = $(a));
                for (var c;
                    (c = a.children()).length;) a = c.first();
                $(a).append(this)
            }
            return this
        },
        wrapInner: function(a) {
            var h = c(a);
            return this.each(function(c) {
                var v = $(this),
                    g = v.contents(),
                    y = h ? a.call(this, c) : a;
                g.length ? g.wrapAll(y) : v.append(y)
            })
        },
        unwrap: function() { return this.parent().each(function() { $(this).replaceWith($(this).children()) }), this },
        clone: function() { return this.map(function() { return this.cloneNode(!0) }) },
        hide: function() { return this.css("display", "none") },
        toggle: function(a) {
            return this.each(function() {
                var c = $(this);
                (a === F ? "none" == c.css("display") : a) ? c.show(): c.hide()
            })
        },
        prev: function(a) { return $(this.pluck("previousElementSibling")).filter(a || "*") },
        next: function(a) { return $(this.pluck("nextElementSibling")).filter(a || "*") },
        html: function(a) {
            return 0 in arguments ? this.each(function(c) {
                var h = this.innerHTML;
                $(this).empty().append(k(this, a, c, h))
            }) : 0 in this ? this[0].innerHTML : null
        },
        text: function(a) {
            return 0 in arguments ? this.each(function(c) {
                var h = k(this, a, c, this.textContent);
                this.textContent = null == h ? "" : "" + h
            }) : 0 in this ? this[0].textContent : null
        },
        attr: function(a, c) {
            var h;
            return "string" != typeof a || 1 in arguments ? this.each(function(h) {
                if (1 === this.nodeType)
                    if (g(a))
                        for (Z in a) A(this, Z, a[Z]);
                    else A(this, a, k(this, c, h, this.getAttribute(a)))
            }) : this.length && 1 === this[0].nodeType ? !(h = this[0].getAttribute(a)) && a in this[0] ? this[0][a] : h : F
        },
        removeAttr: function(a) { return this.each(function() { 1 === this.nodeType && A(this, a) }) },
        prop: function(a, c) { return a = me[a] || a, 1 in arguments ? this.each(function(h) { this[a] = k(this, c, h, this[a]) }) : this[0] && this[0][a] },
        data: function(a, c) {
            var h = "data-" + a.replace(Q, "-$1").toLowerCase(),
                v = 1 in arguments ? this.attr(h, c) : this.attr(h);
            return null !== v ? L(v) : F
        },
        val: function(a) { return 0 in arguments ? this.each(function(c) { this.value = k(this, a, c, this.value) }) : this[0] && (this[0].multiple ? $(this[0]).find("option").filter(function() { return this.selected }).pluck("value") : this[0].value) },
        offset: function(a) {
            if (a) return this.each(function(c) {
                var h = $(this),
                    v = k(this, a, c, h.offset()),
                    g = h.offsetParent().offset(),
                    y = { top: v.top - g.top, left: v.left - g.left };
                "static" == h.css("position") && (y.position = "relative"), h.css(y)
            });
            if (!this.length) return null;
            var c = this[0].getBoundingClientRect();
            return { left: c.left + window.pageXOffset, top: c.top + window.pageYOffset, width: Math.round(c.width), height: Math.round(c.height) }
        },
        css: function(c, h) {
            if (arguments.length < 2) {
                var v = this[0],
                    g = getComputedStyle(v, "");
                if (!v) return;
                if ("string" == typeof c) return v.style[R(c)] || g.getPropertyValue(c);
                if (ve(c)) { var y = {}; return $.each(c, function(a, c) { y[c] = v.style[R(c)] || g.getPropertyValue(c) }), y }
            }
            var b = "";
            if ("string" == a(c)) h || 0 === h ? b = j(c) + ":" + T(c, h) : this.each(function() { this.style.removeProperty(j(c)) });
            else
                for (Z in c) c[Z] || 0 === c[Z] ? b += j(Z) + ":" + T(Z, c[Z]) + ";" : this.each(function() { this.style.removeProperty(j(Z)) });
            return this.each(function() { this.style.cssText += ";" + b })
        },
        index: function(a) { return a ? this.indexOf($(a)[0]) : this.parent().children().indexOf(this[0]) },
        hasClass: function(a) { return a ? z.some.call(this, function(a) { return this.test(_(a)) }, S(a)) : !1 },
        addClass: function(a) {
            return a ? this.each(function(c) {
                if ("className" in this) {
                    D = [];
                    var h = _(this),
                        v = k(this, a, c, h);
                    v.split(/\s+/g).forEach(function(a) { $(this).hasClass(a) || D.push(a) }, this), D.length && _(this, h + (h ? " " : "") + D.join(" "))
                }
            }) : this
        },
        removeClass: function(a) {
            return this.each(function(c) {
                if ("className" in this) {
                    if (a === F) return _(this, "");
                    D = _(this), k(this, a, c, D).split(/\s+/g).forEach(function(a) { D = D.replace(S(a), " ") }), _(this, D.trim())
                }
            })
        },
        toggleClass: function(a, c) {
            return a ? this.each(function(h) {
                var v = $(this),
                    g = k(this, a, h, _(this));
                g.split(/\s+/g).forEach(function(a) {
                    (c === F ? !v.hasClass(a) : c) ? v.addClass(a): v.removeClass(a)
                })
            }) : this
        },
        scrollTop: function(a) { if (this.length) { var c = "scrollTop" in this[0]; return a === F ? c ? this[0].scrollTop : this[0].pageYOffset : this.each(c ? function() { this.scrollTop = a } : function() { this.scrollTo(this.scrollX, a) }) } },
        scrollLeft: function(a) { if (this.length) { var c = "scrollLeft" in this[0]; return a === F ? c ? this[0].scrollLeft : this[0].pageXOffset : this.each(c ? function() { this.scrollLeft = a } : function() { this.scrollTo(a, this.scrollY) }) } },
        position: function() {
            if (this.length) {
                var a = this[0],
                    c = this.offsetParent(),
                    h = this.offset(),
                    v = G.test(c[0].nodeName) ? { top: 0, left: 0 } : c.offset();
                return h.top -= parseFloat($(a).css("margin-top")) || 0, h.left -= parseFloat($(a).css("margin-left")) || 0, v.top += parseFloat($(c[0]).css("border-top-width")) || 0, v.left += parseFloat($(c[0]).css("border-left-width")) || 0, { top: h.top - v.top, left: h.left - v.left }
            }
        },
        offsetParent: function() { return this.map(function() { for (var a = this.offsetParent || V.body; a && !G.test(a.nodeName) && "static" == $(a).css("position");) a = a.offsetParent; return a }) }
    }, $.fn.detach = $.fn.remove, ["width", "height"].forEach(function(a) {
        var c = a.replace(/./, function(m) { return m[0].toUpperCase() });
        $.fn[a] = function(g) { var y, b = this[0]; return g === F ? h(b) ? b["inner" + c] : v(b) ? b.documentElement["scroll" + c] : (y = this.offset()) && y[a] : this.each(function(c) { b = $(this), b.css(a, k(this, g, c, b[a]())) }) }
    }), ee.forEach(function(c, h) {
        var v = h % 2;
        $.fn[c] = function() {
            var c, g, y = $.map(arguments, function(h) { return c = a(h), "object" == c || "array" == c || null == h ? h : he.fragment(h) }),
                b = this.length > 1;
            return y.length < 1 ? this : this.each(function(a, c) {
                g = v ? c : c.parentNode, c = 0 == h ? c.nextSibling : 1 == h ? c.firstChild : 2 == h ? c : null;
                var w = $.contains(V.documentElement, g);
                y.forEach(function(a) {
                    if (b) a = a.cloneNode(!0);
                    else if (!g) return $(a).remove();
                    g.insertBefore(a, c), w && M(a, function(a) { null == a.nodeName || "SCRIPT" !== a.nodeName.toUpperCase() || a.type && "text/javascript" !== a.type || a.src || window.eval.call(window, a.innerHTML) })
                })
            })
        }, $.fn[v ? c + "To" : "insert" + (h ? "Before" : "After")] = function(a) { return $(a)[c](this), this }
    }), he.Z.prototype = $.fn, he.uniq = W, he.deserializeValue = L, $.zepto = he, $
}();
window.$ = window.Zepto = Zepto,
    function(a) {
        function c(a) { return a._zid || (a._zid = C++) }

        function h(a, h, y, b) { if (h = v(h), h.ns) var w = g(h.ns); return (k[c(a)] || []).filter(function(a) { return !(!a || h.e && a.e != h.e || h.ns && !w.test(a.ns) || y && c(a.fn) !== c(y) || b && a.sel != b) }) }

        function v(a) { var c = ("" + a).split("."); return { e: c[0], ns: c.slice(1).sort().join(" ") } }

        function g(a) { return new RegExp("(?:^| )" + a.replace(" ", " .* ?") + "(?: |$)") }

        function y(a, c) { return a.del && !_ && a.e in L || !!c }

        function b(a) { return M[a] || _ && L[a] || a }

        function w(h, g, w, E, S, C, O) {
            var P = c(h),
                N = k[P] || (k[P] = []);
            g.split(/\s/).forEach(function(c) {
                if ("ready" == c) return a(document).ready(w);
                var g = v(c);
                g.fn = w, g.sel = S, g.e in M && (w = function(e) { var c = e.relatedTarget; return !c || c !== this && !a.contains(this, c) ? g.fn.apply(this, arguments) : void 0 }), g.del = C;
                var P = C || w;
                g.proxy = function(e) { if (e = j(e), !e.isImmediatePropagationStopped()) { e._data = E, e.data = a.extend({}, E, e._args); var c = P.apply(h, e._args == T ? [e] : [e].concat(e._args)); return c === !1 && (e.preventDefault(), e.stopPropagation()), c } }, g.i = N.length, N.push(g), "addEventListener" in h && h.addEventListener(b(g.e), g.proxy, y(g, O))
            })
        }

        function E(a, v, g, w, E) {
            var j = c(a);
            (v || "").split(/\s/).forEach(function(c) { h(a, c, g, w).forEach(function(c) { delete k[j][c.i], "removeEventListener" in a && a.removeEventListener(b(c.e), c.proxy, y(c, E)) }) })
        }

        function j(c, h) {
            return (h || !c.isDefaultPrevented) && (h || (h = c), a.each(D, function(a, v) {
                var g = h[a];
                c[a] = function() { return this[v] = F, g && g.apply(h, arguments) }, c[v] = Z
            }), (h.defaultPrevented !== T ? h.defaultPrevented : "returnValue" in h ? h.returnValue === !1 : h.getPreventDefault && h.getPreventDefault()) && (c.isDefaultPrevented = F)), c
        }

        function S(a) { var c, h = { originalEvent: a }; for (c in a) $.test(c) || a[c] === T || (h[c] = a[c]); return j(h, a) }
        var T, C = 1,
            O = Array.prototype.slice,
            P = a.isFunction,
            N = function(a) { return "string" == typeof a },
            k = {},
            A = {},
            _ = "onfocusin" in window,
            L = { focus: "focusin", blur: "focusout" },
            M = { mouseenter: "mouseover", mouseleave: "mouseout" };
        A.click = A.mousedown = A.mouseup = A.mousemove = "MouseEvents", a.event = { add: w, remove: E }, a.proxy = function(h, v) { var g = 2 in arguments && O.call(arguments, 2); if (P(h)) { var y = function() { return h.apply(v, g ? g.concat(O.call(arguments)) : arguments) }; return y._zid = c(h), y } if (N(v)) return g ? (g.unshift(h[v], h), a.proxy.apply(null, g)) : a.proxy(h[v], h); throw new TypeError("expected function") }, a.fn.bind = function(a, c, h) { return this.on(a, c, h) }, a.fn.unbind = function(a, c) { return this.off(a, c) }, a.fn.one = function(a, c, h, v) { return this.on(a, c, h, v, 1) };
        var F = function() { return !0 },
            Z = function() { return !1 },
            $ = /^([A-Z]|returnValue$|layer[XY]$)/,
            D = { preventDefault: "isDefaultPrevented", stopImmediatePropagation: "isImmediatePropagationStopped", stopPropagation: "isPropagationStopped" };
        a.fn.delegate = function(a, c, h) { return this.on(c, a, h) }, a.fn.undelegate = function(a, c, h) { return this.off(c, a, h) }, a.fn.live = function(c, h) { return a(document.body).delegate(this.selector, c, h), this }, a.fn.die = function(c, h) { return a(document.body).undelegate(this.selector, c, h), this }, a.fn.on = function(c, h, v, g, y) { var b, j, C = this; return c && !N(c) ? (a.each(c, function(a, c) { C.on(a, h, v, c, y) }), C) : (N(h) || P(g) || g === !1 || (g = v, v = h, h = T), (P(v) || v === !1) && (g = v, v = T), g === !1 && (g = Z), C.each(function(T, C) { y && (b = function(e) { return E(C, e.type, g), g.apply(this, arguments) }), h && (j = function(e) { var c, v = a(e.target).closest(h, C).get(0); return v && v !== C ? (c = a.extend(S(e), { currentTarget: v, liveFired: C }), (b || g).apply(v, [c].concat(O.call(arguments, 1)))) : void 0 }), w(C, c, g, v, h, j || b) })) }, a.fn.off = function(c, h, v) { var g = this; return c && !N(c) ? (a.each(c, function(a, c) { g.off(a, h, c) }), g) : (N(h) || P(v) || v === !1 || (v = h, h = T), v === !1 && (v = Z), g.each(function() { E(this, c, v, h) })) }, a.fn.trigger = function(c, h) { return c = N(c) || a.isPlainObject(c) ? a.Event(c) : j(c), c._args = h, c.data = h, c.forwardedTouchEvent = !0, this.each(function() { "dispatchEvent" in this ? this.dispatchEvent(c) : a(this).triggerHandler(c, h) }) }, a.fn.triggerHandler = function(c, v) { var e, g; return this.each(function(i, y) { e = S(N(c) ? a.Event(c) : c), e._args = v, e.data = v, e.target = y, a.each(h(y, c.type || c), function(i, a) { return g = a.proxy(e), e.isImmediatePropagationStopped() ? !1 : void 0 }) }), g }, "focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(c) { a.fn[c] = function(a) { return a ? this.bind(c, a) : this.trigger(c) } }), ["focus", "blur"].forEach(function(c) { a.fn[c] = function(a) { return a ? this.bind(c, a) : this.each(function() { try { this[c]() } catch (e) {} }), this } }), a.Event = function(a, c) {
            N(a) || (c = a, a = c.type);
            var h = document.createEvent(A[a] || "Events"),
                v = !0;
            if (c)
                for (var g in c) "bubbles" == g ? v = !!c[g] : h[g] = c[g];
            return h.initEvent(a, v, !0), j(h)
        }
    }(Zepto),
    function(a) {
        function c(c, h, v) { var g = a.Event(h); return a(c).trigger(g, v), !g.isDefaultPrevented() }

        function h(a, h, v, g) { return a.global ? c(h || _, v, g) : void 0 }

        function v(c) { c.global && 0 === a.active++ && h(c, null, "ajaxStart") }

        function g(c) { c.global && !--a.active && h(c, null, "ajaxStop") }

        function y(a, c) { var v = c.context; return c.beforeSend.call(v, a, c) === !1 || h(c, v, "ajaxBeforeSend", [a, c]) === !1 ? !1 : void h(c, v, "ajaxSend", [a, c]) }

        function b(a, c, v, g) {
            var y = v.context,
                b = "success";
            v.success.call(y, a, b, c), g && g.resolveWith(y, [a, b, c]), h(v, y, "ajaxSuccess", [c, v, a]), E(b, c, v)
        }

        function w(a, c, v, g, y) {
            var b = g.context;
            g.error.call(b, v, c, a), y && y.rejectWith(b, [v, c, a]), h(g, b, "ajaxError", [v, g, a || c]), E(c, v, g)
        }

        function E(a, c, v) {
            var y = v.context;
            v.complete.call(y, c, a), h(v, y, "ajaxComplete", [c, v]), g(v)
        }

        function j() {}

        function S(a) { return a && (a = a.split(";", 2)[0]), a && (a == $ ? "html" : a == Z ? "json" : M.test(a) ? "script" : F.test(a) && "xml") || "text" }

        function T(a, c) { return "" == c ? a : (a + "&" + c).replace(/[&?]{1,2}/, "?") }

        function C(c) { c.processData && c.data && "string" != a.type(c.data) && (c.data = a.param(c.data, c.traditional)), !c.data || c.type && "GET" != c.type.toUpperCase() || (c.url = T(c.url, c.data), c.data = void 0) }

        function O(c, h, v, g) { return a.isFunction(h) && (g = v, v = h, h = void 0), a.isFunction(v) || (g = v, v = void 0), { url: c, data: h, success: v, dataType: g } }

        function P(c, h, v, g) {
            var y, b = a.isArray(h),
                w = a.isPlainObject(h);
            a.each(h, function(h, E) { y = a.type(E), g && (h = v ? g : g + "[" + (w || "object" == y || "array" == y ? h : "") + "]"), !g && b ? c.add(E.name, E.value) : "array" == y || !v && "object" == y ? P(c, E, v, h) : c.add(h, E) })
        }
        var N, k, A = 0,
            _ = window.document,
            L = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
            M = /^(?:text|application)\/javascript/i,
            F = /^(?:text|application)\/xml/i,
            Z = "application/json",
            $ = "text/html",
            D = /^\s*$/;
        a.active = 0, a.ajaxJSONP = function(c, h) {
            if (!("type" in c)) return a.ajax(c);
            var v, g, E = c.jsonpCallback,
                j = (a.isFunction(E) ? E() : E) || "jsonp" + ++A,
                S = _.createElement("script"),
                T = window[j],
                C = function(c) { a(S).triggerHandler("error", c || "abort") },
                O = { abort: C };
            return h && h.promise(O), a(S).on("load error", function(e, y) { clearTimeout(g), a(S).off().remove(), "error" != e.type && v ? b(v[0], O, c, h) : w(null, y || "error", O, c, h), window[j] = T, v && a.isFunction(T) && T(v[0]), T = v = void 0 }), y(O, c) === !1 ? (C("abort"), O) : (window[j] = function() { v = arguments }, S.src = c.url.replace(/\?(.+)=\?/, "?$1=" + j), _.head.appendChild(S), c.timeout > 0 && (g = setTimeout(function() { C("timeout") }, c.timeout)), O)
        }, a.ajaxSettings = { type: "GET", beforeSend: j, success: j, error: j, complete: j, context: null, global: !0, xhr: function() { return new window.XMLHttpRequest }, accepts: { script: "text/javascript, application/javascript, application/x-javascript", json: Z, xml: "application/xml, text/xml", html: $, text: "text/plain" }, crossDomain: !1, timeout: 0, processData: !0, cache: !0 }, a.ajax = function(c) {
            var h = a.extend({}, c || {}),
                g = a.Deferred && a.Deferred();
            for (N in a.ajaxSettings) void 0 === h[N] && (h[N] = a.ajaxSettings[N]);
            v(h), h.crossDomain || (h.crossDomain = /^([\w-]+:)?\/\/([^\/]+)/.test(h.url) && RegExp.$2 != window.location.host), h.url || (h.url = window.location.toString()), C(h);
            var E = h.dataType,
                O = /\?.+=\?/.test(h.url);
            if (O && (E = "jsonp"), h.cache !== !1 && (c && c.cache === !0 || "script" != E && "jsonp" != E) || (h.url = T(h.url, "_=" + Date.now())), "jsonp" == E) return O || (h.url = T(h.url, h.jsonp ? h.jsonp + "=?" : h.jsonp === !1 ? "" : "callback=?")), a.ajaxJSONP(h, g);
            var P, A = h.accepts[E],
                _ = {},
                L = function(a, c) { _[a.toLowerCase()] = [a, c] },
                M = /^([\w-]+:)\/\//.test(h.url) ? RegExp.$1 : window.location.protocol,
                F = h.xhr(),
                Z = F.setRequestHeader;
            if (g && g.promise(F), h.crossDomain || L("X-Requested-With", "XMLHttpRequest"), L("Accept", A || "*/*"), (A = h.mimeType || A) && (A.indexOf(",") > -1 && (A = A.split(",", 2)[0]), F.overrideMimeType && F.overrideMimeType(A)), (h.contentType || h.contentType !== !1 && h.data && "GET" != h.type.toUpperCase()) && L("Content-Type", h.contentType || "application/x-www-form-urlencoded"), h.headers)
                for (k in h.headers) L(k, h.headers[k]);
            if (F.setRequestHeader = L, F.onreadystatechange = function() {
                    if (4 == F.readyState) {
                        F.onreadystatechange = j, clearTimeout(P);
                        var c, v = !1;
                        if (F.status >= 200 && F.status < 300 || 304 == F.status || 0 == F.status && "file:" == M) {
                            E = E || S(h.mimeType || F.getResponseHeader("content-type")), c = F.responseText;
                            try { "script" == E ? (1, eval)(c) : "xml" == E ? c = F.responseXML : "json" == E && (c = D.test(c) ? null : a.parseJSON(c)) } catch (e) { v = e }
                            v ? w(v, "parsererror", F, h, g) : b(c, F, h, g)
                        } else w(F.statusText || null, F.status ? "error" : "abort", F, h, g)
                    }
                }, y(F, h) === !1) return F.abort(), w(null, "abort", F, h, g), F;
            if (h.xhrFields)
                for (k in h.xhrFields) F[k] = h.xhrFields[k];
            var $ = "async" in h ? h.async : !0;
            F.open(h.type, h.url, $, h.username, h.password);
            for (k in _) Z.apply(F, _[k]);
            return h.timeout > 0 && (P = setTimeout(function() { F.onreadystatechange = j, F.abort(), w(null, "timeout", F, h, g) }, h.timeout)), F.send(h.data ? h.data : null), F
        }, a.get = function() { return a.ajax(O.apply(null, arguments)) }, a.post = function() { var c = O.apply(null, arguments); return c.type = "POST", a.ajax(c) }, a.getJSON = function() { var c = O.apply(null, arguments); return c.dataType = "json", a.ajax(c) }, a.fn.load = function(c, h, v) {
            if (!this.length) return this;
            var g, y = this,
                b = c.split(/\s/),
                w = O(c, h, v),
                E = w.success;
            return b.length > 1 && (w.url = b[0], g = b[1]), w.success = function(c) { y.html(g ? a("<div>").html(c.replace(L, "")).find(g) : c), E && E.apply(y, arguments) }, a.ajax(w), this
        };
        var R = encodeURIComponent;
        a.param = function(a, c) { var h = []; return h.add = function(a, c) { this.push(R(a) + "=" + R(c)) }, P(h, a, c), h.join("&").replace(/%20/g, "+") }
    }(Zepto),
    function(a) {
        a.fn.serializeArray = function() { var c, h, v = []; return a([].slice.call(this.get(0).elements)).each(function() { c = a(this), h = c.attr("type"), "fieldset" != this.nodeName.toLowerCase() && !this.disabled && "submit" != h && "reset" != h && "button" != h && ("radio" != h && "checkbox" != h || this.checked) && v.push({ name: c.attr("name"), value: c.val() }) }), v }, a.fn.serialize = function() { var a = []; return this.serializeArray().forEach(function(c) { a.push(encodeURIComponent(c.name) + "=" + encodeURIComponent(c.value)) }), a.join("&") }, a.fn.submit = function(c) {
            if (c) this.bind("submit", c);
            else if (this.length) {
                var h = a.Event("submit");
                this.eq(0).trigger(h), h.isDefaultPrevented() || this.get(0).submit()
            }
            return this
        }
    }(Zepto),
    function(a) {
        function c(a) {
            var c = this.os = {},
                h = this.browser = {},
                v = a.match(/Web[kK]it[\/]{0,1}([\d.]+)/),
                g = a.match(/(Android);?[\s\/]+([\d.]+)?/),
                y = !!a.match(/\(Macintosh\; Intel /),
                b = a.match(/(iPad).*OS\s([\d_]+)/),
                w = a.match(/(iPod)(.*OS\s([\d_]+))?/),
                E = !b && a.match(/(iPhone\sOS)\s([\d_]+)/),
                j = a.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),
                S = a.match(/Windows Phone ([\d.]+)/),
                T = j && a.match(/TouchPad/),
                C = a.match(/Kindle\/([\d.]+)/),
                O = a.match(/Silk\/([\d._]+)/),
                P = a.match(/(BlackBerry).*Version\/([\d.]+)/),
                N = a.match(/(BB10).*Version\/([\d.]+)/),
                k = a.match(/(RIM\sTablet\sOS)\s([\d.]+)/),
                A = a.match(/PlayBook/),
                _ = a.match(/Chrome\/([\d.]+)/) || a.match(/CriOS\/([\d.]+)/),
                L = a.match(/Firefox\/([\d.]+)/),
                M = a.match(/MSIE\s([\d.]+)/) || a.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),
                F = !_ && a.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),
                Z = F || a.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);
            (h.webkit = !!v) && (h.version = v[1]), g && (c.android = !0, c.version = g[2]), E && !w && (c.ios = c.iphone = !0, c.version = E[2].replace(/_/g, ".")), b && (c.ios = c.ipad = !0, c.version = b[2].replace(/_/g, ".")), w && (c.ios = c.ipod = !0, c.version = w[3] ? w[3].replace(/_/g, ".") : null), S && (c.wp = !0, c.version = S[1]), j && (c.webos = !0, c.version = j[2]), T && (c.touchpad = !0), P && (c.blackberry = !0, c.version = P[2]), N && (c.bb10 = !0, c.version = N[2]), k && (c.rimtabletos = !0, c.version = k[2]), A && (h.playbook = !0), C && (c.kindle = !0, c.version = C[1]), O && (h.silk = !0, h.version = O[1]), !O && c.android && a.match(/Kindle Fire/) && (h.silk = !0), _ && (h.chrome = !0, h.version = _[1]), L && (h.firefox = !0, h.version = L[1]), M && (h.ie = !0, h.version = M[1]), Z && (y || c.ios) && (h.safari = !0, y && (h.version = Z[1])), F && (h.webview = !0), c.tablet = !!(b || A || g && !a.match(/Mobile/) || L && a.match(/Tablet/) || M && !a.match(/Phone/) && a.match(/Touch/)), c.phone = !(c.tablet || c.ipod || !(g || E || j || P || N || _ && a.match(/Android/) || _ && a.match(/CriOS\/([\d.]+)/) || L && a.match(/Mobile/) || M && a.match(/Touch/)))
        }
        c.call(a, navigator.userAgent), a.__detect = c
    }(Zepto),
    function(a) {
        a.fn.end = function() { return this.prevObject || a() }, a.fn.andSelf = function() { return this.add(this.prevObject || a()) }, "filter,add,not,eq,first,last,find,closest,parents,parent,children,siblings".split(",").forEach(function(c) {
            var h = a.fn[c];
            a.fn[c] = function() { var a = h.apply(this, arguments); return a.prevObject = this, a }
        })
    }(Zepto),
    function(a) {
        a.Callbacks = function(c) {
            c = a.extend({}, c);
            var h, v, g, y, b, w, E = [],
                j = !c.once && [],
                S = function(a) {
                    for (h = c.memory && a, v = !0, w = y || 0, y = 0, b = E.length, g = !0; E && b > w; ++w)
                        if (E[w].apply(a[0], a[1]) === !1 && c.stopOnFalse) { h = !1; break }
                    g = !1, E && (j ? j.length && S(j.shift()) : h ? E.length = 0 : T.disable())
                },
                T = {
                    add: function() {
                        if (E) {
                            var v = E.length,
                                w = function(h) { a.each(h, function(a, h) { "function" == typeof h ? c.unique && T.has(h) || E.push(h) : h && h.length && "string" != typeof h && w(h) }) };
                            w(arguments), g ? b = E.length : h && (y = v, S(h))
                        }
                        return this
                    },
                    remove: function() {
                        return E && a.each(arguments, function(c, h) {
                            for (var v;
                                (v = a.inArray(h, E, v)) > -1;) E.splice(v, 1), g && (b >= v && --b, w >= v && --w)
                        }), this
                    },
                    has: function(c) { return !(!E || !(c ? a.inArray(c, E) > -1 : E.length)) },
                    empty: function() { return b = E.length = 0, this },
                    disable: function() { return E = j = h = void 0, this },
                    disabled: function() { return !E },
                    lock: function() { return j = void 0, h || T.disable(), this },
                    locked: function() { return !j },
                    fireWith: function(a, c) { return !E || v && !j || (c = c || [], c = [a, c.slice ? c.slice() : c], g ? j.push(c) : S(c)), this },
                    fire: function() { return T.fireWith(this, arguments) },
                    fired: function() { return !!v }
                };
            return T
        }
    }(Zepto),
    function(a) {
        function c(h) {
            var v = [
                    ["resolve", "done", a.Callbacks({ once: 1, memory: 1 }), "resolved"],
                    ["reject", "fail", a.Callbacks({ once: 1, memory: 1 }), "rejected"],
                    ["notify", "progress", a.Callbacks({ memory: 1 })]
                ],
                g = "pending",
                y = {
                    state: function() { return g },
                    always: function() { return b.done(arguments).fail(arguments), this },
                    then: function() {
                        var h = arguments;
                        return c(function(c) {
                            a.each(v, function(i, v) {
                                var g = a.isFunction(h[i]) && h[i];
                                b[v[1]](function() {
                                    var h = g && g.apply(this, arguments);
                                    if (h && a.isFunction(h.promise)) h.promise().done(c.resolve).fail(c.reject).progress(c.notify);
                                    else {
                                        var b = this === y ? c.promise() : this,
                                            w = g ? [h] : arguments;
                                        c[v[0] + "With"](b, w)
                                    }
                                })
                            }), h = null
                        }).promise()
                    },
                    promise: function(c) { return null != c ? a.extend(c, y) : y }
                },
                b = {};
            return a.each(v, function(i, a) {
                var c = a[2],
                    h = a[3];
                y[a[1]] = c.add, h && c.add(function() { g = h }, v[1 ^ i][2].disable, v[2][2].lock), b[a[0]] = function() { return b[a[0] + "With"](this === b ? y : this, arguments), this }, b[a[0] + "With"] = c.fireWith
            }), y.promise(b), h && h.call(b, b), b
        }
        var h = Array.prototype.slice;
        a.when = function(v) {
            var g, y, b, w = h.call(arguments),
                E = w.length,
                i = 0,
                j = 1 !== E || v && a.isFunction(v.promise) ? E : 0,
                S = 1 === j ? v : c(),
                T = function(i, a, c) { return function(v) { a[i] = this, c[i] = arguments.length > 1 ? h.call(arguments) : v, c === g ? S.notifyWith(a, c) : --j || S.resolveWith(a, c) } };
            if (E > 1)
                for (g = new Array(E), y = new Array(E), b = new Array(E); E > i; ++i) w[i] && a.isFunction(w[i].promise) ? w[i].promise().done(T(i, b, w)).fail(S.reject).progress(T(i, y, g)) : --j;
            return j || S.resolveWith(b, w), S.promise()
        }, a.Deferred = c
    }(Zepto),
    function(a, c) {
        function h(a) { return a.replace(/([A-Z])/g, "-$1").toLowerCase() }

        function v(a) { return g ? g + a : a.toLowerCase() }
        var g, y, b, w, E, j, S, T, C, O, P = "",
            N = { Webkit: "webkit", Moz: "", O: "o" },
            k = document.createElement("div"),
            A = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,
            _ = {};
        k.style.transform === c && a.each(N, function(a, h) { return k.style[a + "TransitionProperty"] !== c ? (P = "-" + a.toLowerCase() + "-", g = h, !1) : void 0 }), y = P + "transform", _[b = P + "transition-property"] = _[w = P + "transition-duration"] = _[j = P + "transition-delay"] = _[E = P + "transition-timing-function"] = _[S = P + "animation-name"] = _[T = P + "animation-duration"] = _[O = P + "animation-delay"] = _[C = P + "animation-timing-function"] = "", a.fx = { off: g === c && k.style.transitionProperty === c, speeds: { _default: 400, fast: 200, slow: 600 }, cssPrefix: P, transitionEnd: v("TransitionEnd"), animationEnd: v("AnimationEnd") }, a.fn.animate = function(h, v, g, y, b) { return a.isFunction(v) && (y = v, g = c, v = c), a.isFunction(g) && (y = g, g = c), a.isPlainObject(v) && (g = v.easing, y = v.complete, b = v.delay, v = v.duration), v && (v = ("number" == typeof v ? v : a.fx.speeds[v] || a.fx.speeds._default) / 1e3), b && (b = parseFloat(b) / 1e3), this.anim(h, v, g, y, b) }, a.fn.anim = function(v, g, P, N, k) {
            var L, M, F, Z = {},
                $ = "",
                D = this,
                R = a.fx.transitionEnd,
                W = !1;
            if (g === c && (g = a.fx.speeds._default / 1e3), k === c && (k = 0), a.fx.off && (g = 0), "string" == typeof v) Z[S] = v, Z[T] = g + "s", Z[O] = k + "s", Z[C] = P || "linear", R = a.fx.animationEnd;
            else {
                M = [];
                for (L in v) A.test(L) ? $ += L + "(" + v[L] + ") " : (Z[L] = v[L], M.push(h(L)));
                $ && (Z[y] = $, M.push(y)), g > 0 && "object" == typeof v && (Z[b] = M.join(", "), Z[w] = g + "s", Z[j] = k + "s", Z[E] = P || "linear")
            }
            return F = function(c) {
                if ("undefined" != typeof c) {
                    if (c.target !== c.currentTarget) return;
                    a(c.target).unbind(R, F)
                } else a(this).unbind(R, F);
                W = !0, a(this).css(_), N && N.call(this)
            }, g > 0 && (this.bind(R, F), setTimeout(function() { W || F.call(D) }, 1e3 * (g + k) + 25)), this.size() && this.get(0).clientLeft, this.css(Z), 0 >= g && setTimeout(function() { D.each(function() { F.call(this) }) }, 0), this
        }, k = null
    }(Zepto);
! function(a) {
    var c = !1;
    a.fn.scrollToTop = function(a, h) {
        function w(a) { return (a /= .5) < 1 ? .5 * Math.pow(a, 5) : .5 * (Math.pow(a - 2, 5) + 2) }

        function M() { A.off("touchstart", z), c = !1, "function" == typeof h && h.call(this, F) }
        var T, t, v, A = this,
            F = a || 0,
            b = A.scrollTop(),
            R = b,
            g = F - b,
            k = 2.5 * Math.min(750, Math.min(1500, Math.abs(b - F))),
            y = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(a) {
                var c = (new Date).getTime(),
                    h = Math.max(0, 16 - (c - lastTime)),
                    w = setTimeout(function() { a(c + h) }, h);
                return lastTime = c + h, w
            },
            z = function() { M() };
        c || 0 != g && (A.on("touchstart", z), c = !0, y(function D(a) { c && (T || (T = a), t = Math.min(1, Math.max((a - T) / k, 0)), v = Math.round(b + g * w(t)), g > 0 && v > F && (v = F), 0 > g && F > v && (v = F), R != v && A.scrollTop(v), R = v, v !== F ? y(D) : M()) }))
    }
}(Zepto);